package cn.edu.dutir.corpus.trec;

import cn.edu.dutir.corpus.Topic;
import cn.edu.dutir.utility.Constants;

public class TrecTopic implements Topic {

	private int mNumber;
	private String mText;

	public TrecTopic(int num, String text) {
		mNumber = num;
		mText = text;
	}

	public int number() {
		return mNumber;
	}

	public String queryText() {
		return mText;
	}

	public void number(int num) {
		mNumber = num;
	}

	public void queryText(String text) {
		mText = text;
	}

	public String toString() {
		StringBuffer sb = new StringBuffer();
		sb.append("<query>" + Constants.NEWLINE);
		sb.append("<number>" + mNumber + "</number" + Constants.NEWLINE);
		sb.append("<text>" + mText + "</text>" + Constants.NEWLINE);
		sb.append("</query>" + Constants.NEWLINE);
		return sb.toString();
	}
}
